<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script language="javascript">
    function saveform() {
        if ($("#sku").val() == "") {
            $("#skuerr").html('商品编号(SKU)不能为空！');
            return false;
        }
        if ($("#name").val() == "") {
            $("#nameerr").html('不能为空！');
            return false;
        }

        if ($("#supplier").val() == "") {
            $("#suppliererr").html('来源必须选择！');
            return false;
        }
        if ($("#saleprice").val() == "") {
            $("#salepriceerrerr").html('预售价不能为空！');
            return false;
        }
        AWS.ajax_post($('#otherForm'));
        //$("#otherForm").submit();

    }
    function getSku() {
        var sku = $("#sku").val();
        if (sku) {
            $("#skuerr").html('<img src="/fuman/images/loaders/loader2.gif">');
            $.post("/product/ajaxbutton", {"op": "searchsku","sku":sku}, function (data) {
                if (data == 200) {
                    getdevelop(sku);
                    $("#skuerr").html('');
                } else {
                    $("#skuerr").html('<font color=red>SKU[' + sku + ']已经存在！</font>');
                    //$("#sku").val('');
                }
            }, "json");
        }
    }
    function getdevelop(sku) {
        if (sku) {
            $("#skuerr").html('<img src="/fuman/images/loaders/loader2.gif">');
            $.post("/product/ajaxbutton", {"op": "searchdevelopsku","sku":sku}, function (data) {
                if (data == 200) {
                    $("#skuerr").html('');
                } else {
                    $("#skuerr").html('<font color=red>SKU[' + sku + ']已经存在！</font>');
                    $("#sku").val('');
                }
            }, "json");
        }
    }
    function changsupplier() {
        var supplier = $("#supplier").val();
        if (supplier == 3) {
            $("#showsupplier").show();
        } else {
            $("#showsupplier").hide();
        }
    }

</script>
<title>添加开发新品</title>
<body class="withvernav">
<div class="bodywrapper">
    {{include file='/public/leftmenu.tpl'}}
    <div class="centercontent">

        <div class="pageheader notab">
            <h1 class="pagetitle">查看开发新品</h1>
            <span class="pagedesc"></span>
            <div class="menulist">
                <ul class="profile_summary">
                    <li class="current"><a href="/product/newproduct">新品开发列表</a></li>

                </ul>
            </div>
        </div><!--pageheader-->

        <div id="contentwrapper" class="contentwrapper">

            <div id="basicform" class="subcontent">
 <form class="stdform stdform2"  id="otherForm" method="post" action="/product/saveParentProduct" enctype="multipart/form-data">
         <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
            <thead>
              <tr>
                <th colspan="2" class="head1">基本信息</th>
              </tr>
            </thead>
          </table>

          <table cellpadding="0" cellspacing="0" border="0" class="stdtable">

  <tr>
    <td>商品编号</td>
    <td> {{$detail.sku}}</td>
    <td>中文名称</td>
    <td>{{$detail.name}}</td>
    </tr>
  <tr>
    <td>英文名称</td>
    <td> {{$detail.en_name}}</td>
    <td>来源</td>
    <td> {{foreach from=$factory item=res key=key}}
                          {{if $detail.supplier==$res.id}} {{$res.name}}{{/if}}
                            {{/foreach}}</td>
    </tr>
  
  <tr>
    <td>性别</td>
    <td> {{if $detail.gender==1}}
                       男{{/if}}
                     {{if $detail.gender==2}}
                       女
                       {{/if}}
                       {{if $detail.gender==3}}
                       通用
                       {{/if}}
                        {{if $detail.gender==4}}
                       广码
                       {{/if}}</td>
    <td>预售价*</td>
    <td> {{$detail.saleprice}}</td>
    </tr>
  <tr>
    <td>期望完成时间</td>
    <td> {{$detail.tbopertime}}</td>
    <td>备注</td>
    <td>  {{$detail.memo}}</td>
  </tr>
  <tr>
    <td>创建人</td>
    <td> {{$detail.createName}}</td>
    <td>&nbsp;工价</td>
    <td>&nbsp;{{$detail.wages}}</td>
  </tr>
  
  <tr>
    <td>出样人</td>
    <td> {{$detail.sampleuser}}</td>
    <td>&nbsp;复审人</td>
    <td>&nbsp; {{$detail.reviewagainpepole}}</td>
  </tr>
  <tr>
    <td>出图人</td>
    <td>   {{$detail.overuser}}</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
 
  
  
  <tr>
    <td>成本价</td>
    <td>{{$detail.samplecosprice}}</td>
    <td>批量价</td>
    <td> {{$detail.bulkprice}}</td>
  </tr>
  <tr>
    <td>质检信息</td>
    <td colspan="3"> {{$detail.bodystandard}}+ {{$detail.qualitymemo}}</td>
    </tr>
  <tr>
    <td>面料</td>
    <td colspan="3">  {{$detail.ck}}</td>
    </tr>
  <tr>
    <td>出样备注</td>
    <td colspan="3"> {{$detail.samplememo}}</td>
    </tr>
    <tr>
    <td>物料信息</td>
    <td colspan="3">
    
    <table width="100%" border="1">
     {{foreach from=$detailmaterial item=li key=key}}
  <tr>
    <td>物料编号：{{$li.materialcode}} </td>
    <td>物料数量：{{$li.materialnum}} </td>
    <td>物料名称：{{$li.materialname}} </td>
    <td>物料类别：{{$li.materialtypename}} </td>
    <td>物料单价：{{$li.materwages}} </td>
  </tr>
    {{/foreach}}
</table>

   </td>
    </tr>
</table>
</form>

            </div><!--subcontent-->

            <!--subcontent-->

        </div><!--contentwrapper-->

    </div><!-- centercontent -->


</div><!--bodywrapper-->

</body>
</html>
